# try something like
db=SQLDB("sqlite://db.db")

db.define_table('idmap',
    SQLField('nid','integer'),
    SQLField('pid','integer'),
    SQLField('sid','text'))
db.define_table('msgitem',
    SQLField('nid','integer'),
    SQLField('msg','text'))